/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import java.util.List;
import java.util.Map;

import com.sigmatrix.h5.dao.impl.common.BaseDao;
import com.sigmatrix.h5.dto.OutStorageData;
import com.sigmatrix.h5.entity.OutStorage;
import com.sigmatrix.h5.exception.DaoException;

/**
 *@ClassName: OutStorageDao
 *@Description: 出库单数据库操作接口
 *@author youjun
 *@date 2017-06-24 17:33:53
 */
public interface OutStorageDao extends BaseDao<OutStorage> {

	/**
	 *@Title: findById
	 *@Description: 根据主键查找出库单
	 *@return OutStorage
	 *@author youjun
	 *@date 2017-06-24 17:33:53
	 *@param id
	 * @param enterpriseCode 企业code
	 *@return
	 *@throws DaoException 
	 */
	OutStorage findById(final Long id, final String enterpriseCode) throws DaoException;
	
	/**
	 *@Title: save
	 *@Description: 保存出库单,返回保存的主键
	 *@return long
	 *@author youjun
	 *@date 2017-06-24 17:33:53
	 *@param outStorage
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException 
	 */
	long save(final OutStorage outStorage, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: update
	 *@Description: 更新出库单
	 *@return int
	 *@author youjun
	 *@date 2017-06-24 17:33:53
	 *@param outStorage
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException 
	 */
	int update(final OutStorage outStorage, final String enterpriseCode) throws DaoException;
	
	/**
	 *@Title: findListByCondition
	 *@Description: 根据条件查找出库单列表
	 *@return List<OutStorage>
	 *@author youjun
	 *@date 2017-06-24 17:33:53
	 *@param outStorage
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException
	 */
	List<OutStorage> findListByCondition(final OutStorage outStorage, final String enterpriseCode) throws DaoException;

	/**
	 *@Title: findPartColumnListByCondition
	 *@Description: 根据条件查找出库单部分列的列表
	 *@return List<OutStorageData>
	 *@author youjun
	 *@date 2017年6月24日 下午7:48:55
	 *@param outStorage
	 *@param enterpriseCode
	 *@return
	 *@throws DaoException
	 */
	List<OutStorageData> findPartColumnListByCondition(final OutStorage outStorage, final String enterpriseCode) throws DaoException;
	/**
	 * 
	 *@Title: findPartColumnListByCondition
	 *@Description: TODO()
	 *@return List<OutStorageData>
	 *@author gaomingkai
	 *@date 2018年1月22日 下午9:20:58
	 *@param outStorage
	 *@param enterpriseCode
	 *@param isMatchUser
	 *@param terminalUserId
	 *@return
	 *@throws DaoException
	 */
	List<OutStorageData> findPartColumnListByCondition(final OutStorage outStorage, final String enterpriseCode, 
			final boolean isMatchUser, final int terminalUserId) throws DaoException;
	/**
	 *@Title: findByPage
	 *@Description: 分页查询出库单列表
	 *@return List<OutStorage>
	 *@author youjun
	 *@date 2017年7月8日 上午11:07:16
	 *@param pageNo
	 *@param pageSize
	 *@param outStorage
	 * @param otherParamsMap 
	 * @param enterpriseCode
	 *@return
	 *@throws DaoException
	 */
	List<OutStorage> findByPage(final int pageNo, final int pageSize, final OutStorage outStorage, 
			final Map<String, Object> otherParamsMap, final String enterpriseCode) throws DaoException;
	/**
	 * 
	 *@Title: findByPage
	 *@Description: TODO()
	 *@return List<OutStorage>
	 *@author gaomingkai
	 *@date 2018年1月23日 上午11:01:59
	 *@param pageNo
	 *@param pageSize
	 *@param outStorage
	 *@param otherParamsMap
	 *@param enterpriseCode
	 *@param userId
	 *@return
	 *@throws DaoException
	 */
	List<OutStorage> findByPage(final int pageNo, final int pageSize, final OutStorage outStorage, 
			final Map<String, Object> otherParamsMap, final String enterpriseCode,final Integer terminalUserId) throws DaoException;


	/**
	 *@Title: getCountByCondition
	 *@Description: 查询出库单数量
	 *@return int
	 *@author youjun
	 *@date 2017年7月8日 上午11:07:49
	 *@param outStorage
	 * @param otherParamsMap 
	 *@return
	 *@throws DaoException
	 */
	int getCountByCondition(final OutStorage outStorage, final Map<String, Object> otherParamsMap, final String enterpriseCode) throws DaoException;
	/**
	 * 
	 *@Title: getCountByCondition
	 *@Description: TODO()
	 *@return int
	 *@author gaomingkai
	 *@date 2018年1月23日 上午11:08:59
	 *@param outStorage
	 *@param otherParamsMap
	 *@param enterpriseCode
	 *@param terminalUserId
	 *@return
	 *@throws DaoException
	 */
	int getCountByCondition(final OutStorage outStorage, final Map<String, Object> otherParamsMap, final String enterpriseCode,final Integer terminalUserId) throws DaoException;

	/**
	 *@Title: close
	 *@Description: TODO()
	 *@return void
	 *@author youjun
	 *@date 2017年8月23日 下午4:25:46
	 *@param id
	 *@param enterpriseCode
	 */
	int close(long id, String enterpriseCode) throws DaoException;
}
